package org.example.bookmanage.controller;

import org.example.bookmanage.model.BookInfo;
import org.example.bookmanage.service.BookService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

@RequestMapping("/book")
@RestController
public class BookController {
    BookService bookService = new BookService();
    @RequestMapping("/getBookList")
    public List<BookInfo> getBookList() {
        //1.获取图书数据
        //2.对图书数据进行处理
        //3.返回数据
        //mock 表示虚拟的假数据
        List<BookInfo> bookInfos = bookService.getBookList();
        return bookInfos;
    }


}
